<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">

<!--表格id与lay-filter属性一致，统一定义为zmn-table-->
<table class="layui-hide" id="zmn-table" lay-filter="zmn-table" th:fragment="table">
    <thead >
    <tr>
        <!--规定“ID”列置于第3列，居中显示-->
        <th lay-data="{field:'cityId', width:150, unresize:true, align:'center'}">区域ID</th>
        <!--规定“名称/标题”列置于第4列，通常居左显示，字数较少可以居中显示-->
        <th lay-data="{field:'name', unresize:true, align:'center'}">城市名称</th>
        <th th:if="${vo.bizType==1}" lay-data="{field:'meterRatio', unresize:true, align:'center'}">计价器3.0系数</th>
        <th lay-data="{field:'cityRatio', unresize:true, align:'center'}">默认系数</th>
        <th lay-data="{field:'updater', width:200, unresize:true, align:'center'}">最近修改人/时间</th>
        <!--规定操作列置于最后-->
        <th lay-data="{field:'操作', width:250, unresize:true, align:'center', fixed:'right'}">操作</th>
        <!--其他规范
            值较大的数字列居右显示，并使用千分号；值较小的数字列可居中显示，
            金额列统一居右显示，默认精确到小数点后2位，并使用千分号，
            通常情况下，时间或日期列靠后放置(操作列前)，居中显示
            -->
    </tr>
    </thead>
    <tbody>
    <tr th:each="item:${items}">
        <td th:text="${item.cityId}">cityId</td>
        <td th:text="${item.name}">name</td>
        <td th:if="${vo.bizType==1}" th:text="${item.meterToBeEffectiveRatio == null && item.meterRatio == null ? '-' : ((item.meterToBeEffectiveRatio == null ? '-': item.meterToBeEffectiveRatio) + '/' + (item.meterRatio == null ? '-': item.meterRatio))}">meterRadio</td>
        <td th:text="${item.toBeEffectiveRatio == null && item.ratio == null ? '-' : ((item.toBeEffectiveRatio == null ? '-': item.toBeEffectiveRatio) + '/' + (item.ratio == null ? '-': item.ratio))}"></td>
        <td th:text="${item.updater == null ? '' : item.updater} + '/' + ${T(com.zmn.common.utils.date.DateUtil).toString(item.updateTime)}">updaterAndUpdateTime</td>
        <td>
            <zmn th:if="${item.cityId == null}">
                <a th:if="${#authPermit.checkPermit('/channel/citypriceratio/cityRatio.action?bizType='+bizType+'&priceType='+priceType)}" href="javascript:void(0)"  th:onclick="setChannelRatio([[${channelId}]], [[${bizType}]], [[${priceType}]]);"  style="color: #00a0e9">默认系数</a>&nbsp;&nbsp;&nbsp;
            </zmn>
            <zmn th:if="${item.cityId != null}">
                <a th:if="${#authPermit.checkPermit('/channel/citypriceratio/cityRatio.action?bizType='+bizType+'&priceType='+priceType)}" href="javascript:void(0)" th:onclick="setCityRatio([[${item.cityId}]], [[${item.provinceId}]], [[${channelId}]], [[${bizType}]], [[${priceType}]]);"  style="color: #00a0e9">默认系数</a>&nbsp;&nbsp;&nbsp;
                <a th:if="${#authPermit.checkPermit('/channel/citypriceratio/categoryRatio.action?bizType='+bizType+'&priceType='+priceType)}" th:lay-href="|/channel/citypriceratio/categoryRatio.action?cityId=${item.cityId}&provinceId=${item.provinceId}&cityName=${item.name}&channelId=${channelId}&addFlag=${addFlag}&bizType=${bizType}&priceType=${priceType}|" style="color: #00a0e9">分类系数</a>
            </zmn>
        </td>
    </tr>
    </tbody>
</table>
